package com.vincce.sport.mapper;

import java.util.List;
import java.util.Map;

import com.vincce.sport.core.MyBatisRepository;
import com.vincce.sport.entity.Advert;
import com.vincce.sport.entity.Page;

@MyBatisRepository
public interface AdvertMapper {
	/**
	 * 分页显示广告位
	 * @param page
	 * @return
	 */
	public List<Advert> queryAdvertList(Page<Advert> page);
	/**
	 * 总数查询广告位
	 * @param map
	 * @return
	 */
	public Long queryAdvertCount(Map<String, Object> map);
	/**
	 * 根据ID查询广告位
	 * @param id
	 * @return
	 */
	public Advert findAdvertById(Long id);
	/**
	 * 查询全部广告位
	 * @return
	 */
	public List<Advert> findAllAdvert();
	/**
	 * 添加广告位
	 * @param advert
	 * @return
	 */
	public Long insertAdvert(Advert advert);
	/**
	 * 修改广告位
	 * @param advert
	 * @return
	 */
	public Long updateAdvert(Advert advert);
	/**
	 * 根据ID删除广告位
	 * @param id
	 */
	public void deleteById(Long id);
	/**
	 * 条件查询广告位
	 * @param advert
	 * @return
	 */
	public List<Advert> findAdvertByOne(Advert advert);
	/**
	 * 前台展示广告位查询
	 * @param page
	 * @return
	 */
	public List<Advert> queryAdverListPage(Page<Advert> page);
	
}
